home *** CD-ROM | disk | FTP | other *** search
- Path: netnews.worldnet.att.net!newsadm
- From: dslayer@worldnet.att.net (Raymond Joh)
- Newsgroups: comp.lang.c
- Subject: Newbie needs help w/ARGV ARGC
- Date: Mon, 25 Mar 1996 00:46:12 GMT
- Organization: AT&T WorldNet Services
- Message-ID: <4j4ja1$dc3@mtinsc01-mgt.ops.worldnet.att.net>
- NNTP-Posting-Host: 137.atlanta-2.ga.dial-access.att.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- I have spent three days attempting to determine why my command line
- arguments are failing...
-
- I am using MS Quick C 2.5
-
- I just want to be able to enter two file paths at the command line.
- Here is my code:
-
- #include <stdio.h>
- #include <stdlib.h>
-
-
-
- main(int argc, char *argv[],char *envp[])
- {
- FILE *ofp,*nfp;
- char ch;
-
- gets(*argv);
-
- if (argc!=3)
- {
- printf("Enter: <source> <destination>\n");
- exit(1);
- }
-
- Code countinues but when I enter my command line input such as:
-
- A:\readme.txt A:\newfile.txt
-
- I get my arvc error message above
- I'm sure I've missed something simple but it has me stumped.
- (win95 if OS matters.)
- Thanks in Advance!!
- Raymond Joh
- ##############################################################
- Raymond Joh If you can't tie a good knot...
- Dslayer@gnn.com ...Tie a BUNCH of them!!!
- Dslayer@worldnet.att.net
- Home Page ==>>http://members.aol.com/ggjoh/index.htm
- ##############################################################
-
-